//
//  Gauge.m
//  SeaMelonSeeds_Counselor
//
//  Created by 尤振宇 on 2017/8/1.
//  Copyright © 2017年 杨笑. All rights reserved.
//

#import "GaugeApi.h"

@implementation GaugeApi

-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

-(NSString *)requestUrl
{
    return @"gauge/lists";
}


@end


@implementation Scale

-(void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"gauges"]) {
        NSMutableArray *arr = [NSMutableArray array];
        
        for (NSDictionary *dic in value) {
            Scale *obj = [[Scale alloc]init];
            [obj setValuesForKeysWithDictionary:dic];
            [arr addObject:obj];
        }
        self.gauges = arr;
    }
}

-(NSArray *)dataArr
{
    return self.gauges;
}

-(NSString *)categoryTitle
{
    return self.name;
}

@end
